#pragma once


#include <SFML\Graphics.hpp>
#include <SFML\Audio.hpp>
#include "Player.h"
#include "Animation.h"


class mutant {
public:
	mutant();
	~mutant();


	void Initialize(sf::RenderWindow* win, Player* player, sf::Texture* walkImage, sf::Texture* attackImage);
	void Update();
	void Cleanup();

	void attack_player(sf::Sound* mutantAttack);
	void attack_ship(sf::Sound* mutantAttack);


	void Spawn(float xPos, float yPos);
	bool IsBusy();
	void Destroy();
	sf::FloatRect GetRect();
	int m_health;
	float distanceX;
	float distanceY;
	float distanceXship;
	float distanceYship;
	float distanceXplayer;
	float distanceYplayer;
	float distancePlayer;
	float distanceShip;
	float radianShip;
	float radianPlayer;

	sf::Sprite* m_sprite;
	sf::Sprite* m_attackSprite;
	sf::Clock* m_chaseClock;
	sf::Clock* m_clock;
	sf::Clock* m_attackClock;

	bool playerDown;

	sf::Sound m_growl;

private:
	sf::RenderWindow* m_renderWindow;
	sf::Texture* m_walkImage;
	Animation* m_walkAnimation;
	Animation* m_attackAnimation;
	sf::Time m_attackTimer;
	sf::Time timeSinceLastFrame;
	sf::Time chaseTime;
	bool clockRestarted;
	float playerAngle;
	float shipAngle;
	float speed;
	
	bool hasStartedChasing;
	sf::SoundBuffer m_growlBuffer;


	Player* m_player;

	

	bool m_isBusy;

};

